﻿using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;

namespace LanusMarket.Models
{
    public class LanusMarketContext : DbContext
    {
        // You can add custom code to this file. Changes will not be overwritten.
        // 
        // If you want Entity Framework to drop and regenerate your database
        // automatically whenever you change your model schema, add the following
        // code to the Application_Start method in your Global.asax file.
        // Note: this will destroy and re-create your database with every model change.
        // 
        // System.Data.Entity.Database.SetInitializer(new System.Data.Entity.DropCreateDatabaseIfModelChanges<LanusMarket.Models.LanusMarketContext>());

        public IDbSet<Aviso> Avisos { get; set; }
        public IDbSet<Categoria> Categorias { get; set; }
        public IDbSet<Pais> Paises { get; set; }
        public IDbSet<Provincia> Provincias { get; set; }
        public IDbSet<Localidad> Localidades { get; set; }
        public IDbSet<Ubicacion> Ubicaciones { get; set; }
        public IDbSet<SearchKey> SearchKeys { get; set; }
                       
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();

           
        }

        
        
    }
}
